//
//  NewAddressCell.m
//  itboye2015002
//
//  Created by boye_mac1 on 15/8/25.
//  Copyright (c) 2015年 Boye. All rights reserved.
//

#import "NewAddressCell.h"

@implementation NewAddressCell

- (void)awakeFromNib {
    // Initialization code
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.contentView.width = SCREEN_WIDTH;
        self.contentView.backgroundColor = [UIColor clearColor];
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        [self _initViews];
    }
    return self;
}

-(void)_initViews{
    
    CGFloat left = 20;
    CGFloat right = 30;
    
    //标签
    self.headLabel = [[UILabel alloc] init];
    self.headLabel.bounds = CGRectMake(0, 0, 80, 25);
    self.headLabel.center = CGPointMake(left + self.headLabel.width/2.0, self.contentView.center.y);
    self.headLabel.font = FONT(15);
    self.headLabel.textColor = [UIColor colorWithHexString:@"#969696"];
    [self.contentView addSubview:self.headLabel];
    
    //输入框
    self.textField = [[UITextField alloc] init];
    CGFloat textFieldWidth = self.contentView.width - right -self.headLabel.right;
    self.textField.bounds = CGRectMake(0, 0, textFieldWidth, self.contentView.height);
    self.textField.center = CGPointMake(self.headLabel.right + self.textField.width/2.0, self.headLabel.center.y);
    
    self.textField.font = FONT(15);
    self.textField.borderStyle = UITextBorderStyleNone;
    [self.contentView addSubview:self.textField];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
